﻿<!DOCTYPE html>
<html>
<head>
    <title>Foursquare Helper for WebMatrix - Reference</title>
    <link href="content/Site.css" rel="stylesheet" type="text/css" />
    <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
</head>
<body>
    <div class="container">
        <div class="header">
            <img src="content/images/webx-icon.png" alt="WebMatrix" />
            <img src="content/images/foursquare-logo.png" alt="Foursquare Logo" class="partnerLogo" />
            <h1>
                Microsoft WebMatrix Helpers</h1>
            <h2>
                Foursquare Helper - Reference</h2>
        </div>
        <div class="content">
            <div class="navLinks">
                <a href="startHere.htm">Start Here</a> | <a href="reference.htm">Helper Reference</a>
            </div>
            <h3>
                Helper Methods</h3>
			<p><em>Note: Current version does not support the full Foursquare API.</em></p>
            <table class="memberdecls">
                <tr>
                    <td class="memItemLeft">
                        static void
                    </td>
                    <td class="memItemRight">
                        <strong>Initialize</strong> (string consumerKey, string consumerSecret, [string callbackUrl])
                    </td>
                </tr>
                <tr>
                    <td class="mdescLeft">
                        &nbsp;
                    </td>
                    <td class="mdescRight">
                        Initializes the Foursquare helper with the consumer key and secret values. 
                    </td>
                </tr>
                <tr>
                    <td class="memItemLeft">
                        static string
                    </td>
                    <td class="memItemRight">
                        <strong>GetAuthorizationLink</strong> ([string returnUrl])
                    </td>
                </tr>
                <tr>
                    <td class="mdescLeft">
                        &nbsp;
                    </td>
                    <td class="mdescRight">
                        Retrieves the Foursquare login Url, for your users to login to Foursquare throught
                        your site.
                    </td>
                </tr>
                 <tr>
                    <td class="memItemLeft">
                        static string
                    </td>
                    <td class="memItemRight">
                        <strong>GetAccessToken</strong> ()
                    </td>
                </tr>
                <tr>
                    <td class="mdescLeft">
                        &nbsp;
                    </td>
                    <td class="mdescRight">
                        Once the user has granted access into Foursquare, this method returns the user's AccessToken for calling the helper methods that require it.
                    </td>
                </tr>
                <tr>
                    <td class="memItemLeft">
                        static IList&lt;<a href="http://developer.foursquare.com/docs/responses/user.html">User</a>&gt;
                    </td>
                    <td class="memItemRight">
                        <b>GetFriends</b> (string accessToken, [int userId])
                    </td>
                </tr>
                <tr>
                    <td class="mdescLeft">
                        &nbsp;
                    </td>
                    <td class="mdescRight">
                        Returns the list of friends for a given user. If the userId is not specified,
                        returns the friends of the logged in user.
                    </td>
                </tr>
                <tr>
                    <td class="memItemLeft">
                        static <a href="http://developer.foursquare.com/docs/responses/user.html">User</a>
                    </td>
                    <td class="memItemRight">
                        <strong>GetUser</strong> (string accessToken, [int userId])
                    </td>
                </tr>
                <tr>
                    <td class="mdescLeft">
                        &nbsp;
                    </td>
                    <td class="mdescRight">
                        Returns profile information (badges, etc.) for a given user. If the userId is not specified, returns the logged in user information.
                    </td>
                </tr>
                <tr>
                    <td class="memItemLeft">
                        @helper
                    </td>
                    <td class="memItemRight">
                        <strong>GetFoursquareButton</strong> ([string venueId], [string tipId], [string
                        color])
                    </td>
                </tr>
                <tr>
                    <td class="mdescLeft">
                        &nbsp;
                    </td>
                    <td class="mdescRight">
                        Shows a Foursquare Button, to add a venue or a tip to the user's TODO list. You should either specify the venueId or the tipId.
                        Calling the Initialize() method is not required if you only want to use this method.
                    </td>
                </tr>
                <tr>
                    <td class="memItemLeft">
                        @helper
                    </td>
                    <td class="memItemRight">
                        <strong>GetBadgesWidget</strong> (string accessToken, [int userId])
                    </td>
                </tr>
                 <tr>
                    <td class="mdescLeft">
                        &nbsp;
                    </td>
                    <td class="mdescRight">
                        Shows a widget listing the user's Foursquare badges. If the userId is not specified, defaults to the logged in user.
                    </td>
                </tr>
                <tr><td class="memItemLeft"></td><td class="memItemRight"></td></tr>                              
            </table>         
        </div>
        <ul class="footer">
            <li>We're always looking for <a href="mailto:webapp@microsoft.com">bugs, feedback and
                suggestions!</a></li>
            <li>&copy; 2010-2011 Microsoft Corporation. Powered by IIS Express.</li>
        </ul>
    </div>
</body>
</html>
